package gearunits.models{
	import org.papervision3d.core.math.NumberUV;
	import org.papervision3d.core.math.Number3D;
	import org.papervision3d.core.geom.renderables.Triangle3D;
	import org.papervision3d.core.geom.renderables.Vertex3D;
	import org.papervision3d.core.geom.TriangleMesh3D;
	import org.papervision3d.core.proto.MaterialObject3D;

	public class PMeshStoreshopShirt extends TriangleMesh3D {
		private var ve:Array;
		private var fa:Array;

		public function PMeshStoreshopShirt(material : MaterialObject3D ) {
			super( material, new Array(), new Array() );
			ve = this.geometry.vertices;
			fa = this.geometry.faces;
			v(32.000000,22.000000,3.200001);
			v(32.000000,-42.000000,3.200000);
			v(-32.000004,-42.000000,3.200000);
			v(-31.999985,22.000000,3.200001);
			v(32.000015,22.000000,-3.200000);
			v(31.999981,-42.000000,-3.200000);
			v(-32.000011,-42.000000,-3.200000);
			v(-31.999996,22.000000,-3.200000);
			v(-41.999996,42.000000,-3.200000);
			v(42.000015,42.000000,-3.200000);
			v(-41.999985,42.000000,3.200001);
			v(42.000000,42.000000,3.200001);
			v(59.888542,33.055725,3.200044);
			v(59.888557,33.055725,-3.199957);
			v(49.888557,13.055729,-3.199957);
			v(49.888542,13.055729,3.200044);
			v(-59.888527,33.055725,3.200033);
			v(-59.888542,33.055725,-3.199968);
			v(-49.888542,13.055729,-3.199968);
			v(-49.888527,13.055729,3.200033);

			f(19,18,16,0.529548,0.768149,0.494642,0.768042,0.529900,0.653385,-0.894427,0.000002,-0.447214);
			f(18,17,16,0.494642,0.768042,0.494994,0.653277,0.529900,0.653385,-0.894427,0.000002,-0.447214);
			f(3,7,19,0.565106,0.750843,0.530199,0.750950,0.564807,0.653277,0.447214,-0.000001,-0.894427);
			f(7,18,19,0.530199,0.750950,0.529900,0.653384,0.564807,0.653277,0.447214,-0.000001,-0.894427);
			f(7,8,17,0.349063,0.500985,0.457978,0.555861,0.408896,0.653278,-0.000001,-1.000000,-0.000001);
			f(7,17,18,0.349063,0.500985,0.408896,0.653278,0.299981,0.598402,-0.000001,-1.000000,-0.000001);
			f(8,10,16,0.920472,0.555818,0.955378,0.555711,0.955677,0.653277,-0.447214,0.000001,0.894427);
			f(8,16,17,0.920472,0.555818,0.955677,0.653277,0.920771,0.653385,-0.447214,0.000001,0.894427);
			f(10,3,19,0.917361,0.097416,0.808447,0.152292,0.759364,0.054876,0.000001,1.000000,0.000001);
			f(10,19,16,0.917361,0.097416,0.759364,0.054876,0.868279,0.000000,0.000001,1.000000,0.000001);
			f(14,15,12,0.459384,0.653384,0.494290,0.653277,0.494642,0.768042,0.894427,0.000002,-0.447214);
			f(14,12,13,0.459384,0.653384,0.494642,0.768042,0.459736,0.768149,0.894427,0.000002,-0.447214);
			f(4,0,15,0.565405,0.653277,0.600311,0.653384,0.600012,0.750950,-0.447214,-0.000001,-0.894427);
			f(4,15,14,0.565405,0.653277,0.600012,0.750950,0.565106,0.750843,-0.447214,-0.000001,-0.894427);
			f(0,11,12,0.809518,0.501355,0.918767,0.555562,0.870283,0.653277,-0.000002,1.000000,0.000001);
			f(0,12,15,0.809518,0.501355,0.870283,0.653277,0.761034,0.599071,-0.000002,1.000000,0.000001);
			f(11,9,13,0.953972,0.097566,0.919066,0.097673,0.918767,0.000107,0.447214,0.000001,0.894427);
			f(11,13,12,0.953972,0.097566,0.918767,0.000107,0.953673,0.000000,0.447214,0.000001,0.894427);
			f(9,4,14,0.459384,0.097716,0.350134,0.151922,0.301650,0.054206,0.000002,-1.000000,-0.000001);
			f(9,14,13,0.459384,0.097716,0.301650,0.054206,0.410900,0.000000,0.000002,-1.000000,-0.000001);
			f(10,8,9,0.955378,0.555711,0.920472,0.555818,0.919066,0.097673,0.000000,-0.000000,1.000000);
			f(10,9,11,0.955378,0.555711,0.919066,0.097673,0.953972,0.097566,0.000000,0.000000,1.000000);
			f(0,3,10,0.809518,0.501355,0.808447,0.152292,0.917361,0.097416,-0.000000,1.000000,0.000000);
			f(0,10,11,0.809518,0.501355,0.917361,0.097416,0.918767,0.555562,0.000000,1.000000,0.000000);
			f(7,4,9,0.349063,0.500985,0.350134,0.151922,0.459384,0.097716,-0.000000,-1.000000,0.000000);
			f(7,9,8,0.349063,0.500985,0.459384,0.097716,0.457978,0.555861,0.000000,-1.000000,-0.000000);
			f(2,6,7,0.990584,0.695893,0.955678,0.695786,0.956741,0.349170,-1.000000,0.000001,0.000000);
			f(2,7,3,0.990584,0.695893,0.956741,0.349170,0.991647,0.349277,-1.000000,0.000002,0.000000);
			f(1,5,2,0.991655,0.349063,0.956748,0.349170,0.990584,0.000000,0.000000,0.000000,-1.000000);
			f(5,6,2,0.956748,0.349170,0.955678,0.000107,0.990584,0.000000,0.000000,-0.000000,-1.000000);
			f(0,4,5,0.883861,0.653277,0.918767,0.653385,0.917704,1.000000,1.000000,0.000002,-0.000001);
			f(0,5,1,0.883861,0.653277,0.917704,1.000000,0.882797,0.999893,1.000000,-0.000003,0.000000);
			f(4,7,5,0.350134,0.151922,0.349063,0.500985,0.001071,0.150851,0.000000,-1.000000,0.000000);
			f(7,6,5,0.349063,0.500985,0.000000,0.499914,0.001071,0.150851,0.000000,-1.000000,0.000000);
			f(0,1,3,0.809518,0.501355,0.460454,0.502426,0.808447,0.152292,0.000000,1.000000,-0.000000);
			f(1,2,3,0.460454,0.502426,0.459384,0.153363,0.808447,0.152292,0.000000,1.000000,-0.000000);

			this.x = 0.000000;
			this.y = 0.000000;
			this.z = 0.000000;

			this.rotationX = 0.000000;
			this.rotationY = 0.000000;
			this.rotationZ = 0.000000;

			this.scaleX = 1.000000;
			this.scaleY = 1.000000;
			this.scaleZ = 1.000000;

			this.geometry.ready = true;
		}
		public function v(x:Number, y:Number, z:Number):void {
			ve.push(new Vertex3D(x, y, z));
		}

		public function f(vertexIndex1:Number, vertexIndex2:Number, vertexIndex3:Number, uv00:Number, uv01:Number, uv10:Number, uv11:Number, uv20:Number, uv21:Number, normalx:Number, normaly:Number, normalz:Number):void {
			var face : Triangle3D = new Triangle3D(this, [ve[vertexIndex1], ve[vertexIndex2], ve[vertexIndex3]], null, [ new NumberUV(uv00, uv01), new NumberUV(uv10, uv11), new NumberUV(uv20, uv21) ] );
			face.faceNormal = new Number3D(normalx,normaly,normalz);
			fa.push(face);
		}

		public function f2(vertexIndex1:Number, vertexIndex2:Number, vertexIndex3:Number):void {
			var face:Triangle3D = new Triangle3D(this, [ve[vertexIndex1], ve[vertexIndex2], ve[vertexIndex3]], null, []);
			fa.push(face);
		}

	}
}